package com.ylc.chat.service;

import com.ylc.chat.dao.UserDao;
import com.ylc.chat.entity.User;

public class UserService {

	private static UserDao userDao = new UserDao();

	public User getUser(String uname) {
		return userDao.getUser(uname);
	}
	public User getUser(int uid) {
		return userDao.getUser(uid);
	}
	public User login(String uname, String upassword) {
		return userDao.login(uname, upassword);
	}

    public int addUser(String uname, String upassword) {
		return userDao.addUser(uname, upassword);
    }

	public int isSameName(String uname){
		return userDao.isSameName(uname);

	}
	public int updateOnline(String uname, Integer online) {
		return userDao.updateOnline(uname, online);
	}
	public String getNameById(int uid){
		return userDao.getNameById(uid);
	}
}
